<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Regexp::Common - Provide commonly requested regular expressions - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Regexp-Common - MetaCPAN" href="https://metacpan.org/dist/Regexp-Common/releases.rss" />
        <link rel="canonical" href="./Regexp::Common.html" />
        <meta name="description" content="Provide commonly requested regular expressions" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Regexp::Common" />
<meta name="twitter:title"       content="Regexp::Common" />
<meta name="twitter:description" content="Provide commonly requested regular expressions" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Regexp::Common.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Regexp-Common was released.">
      <span class="relatize">02 Jun 2017 22:07:57 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Regexp-Common">Regexp-Common</a>
  </li>
  <li>
    Module version: 2017060201
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Regexp-Common/source/lib/Regexp/Common.pm">Source</a>
    (<a href="https://metacpan.org/dist/Regexp-Common/source/lib/Regexp/Common.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Regexp-Common/source/lib/Regexp">Browse</a>
    (<a href="https://metacpan.org/dist/Regexp-Common/source/lib/Regexp?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Regexp-Common/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Regexp-Common/contribute">How to Contribute</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Regexp-Common">Issues</a>
      (24)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Regexp-Common+2017060201" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Regexp-Common.html?oncpan=1&amp;distmat=1&amp;version=2017060201&amp;grade=2" style="color: #090">1432</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Regexp-Common.html?oncpan=1&amp;distmat=1&amp;version=2017060201&amp;grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/R/Regexp-Common.html?oncpan=1&amp;distmat=1&amp;version=2017060201&amp;grade=4">6</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/ABIGAIL/Regexp-Common-2017060201">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Regexp-Common who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 2
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Regexp-Common-2017060201/index.html">92.67% Coverage </a>
    </li>
    <li>
      License: mit, mit, bsd, artistic_1, artistic_2
    </li>
    <li>
      Perl: v5.10.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Regexp-Common/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL/Regexp-Common-2017060201.tar.gz">
      Download (<span itemprop="fileSize">232.31KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FABIGAIL%2FRegexp-Common-2017060201%2Flib%2FRegexp%2FCommon.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Regexp-Common/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Regexp-Common/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Regexp-Common">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Regexp-Common">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Regexp/Common.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="ABIGAIL/Regexp-Common-2017060201"
>2017060201
  (ABIGAIL on 2017-06-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2017040401"
>2017040401
  (ABIGAIL on 2017-04-04)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016060801"
>2016060801
  (ABIGAIL on 2016-06-08)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016060201"
>2016060201
  (ABIGAIL on 2016-06-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016060101"
>2016060101
  (ABIGAIL on 2016-05-31)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016053101"
>2016053101
  (ABIGAIL on 2016-05-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016053001"
>2016053001
  (ABIGAIL on 2016-05-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052901"
>2016052901
  (ABIGAIL on 2016-05-29)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052804"
>2016052804
  (ABIGAIL on 2016-05-28)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052803"
>2016052803
  (ABIGAIL on 2016-05-28)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052802"
>2016052802
  (ABIGAIL on 2016-05-27)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052801"
>2016052801
  (ABIGAIL on 2016-05-27)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016020301"
>2016020301
  (ABIGAIL on 2016-02-03)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016010801"
>2016010801
  (ABIGAIL on 2016-01-08)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016010701"
>2016010701
  (ABIGAIL on 2016-01-07)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2015121601"
>2015121601
  (ABIGAIL on 2015-12-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2013031301"
>2013031301
  (ABIGAIL on 2013-03-13)</option>
<option
  
  value="DCONWAY/Regexp-Common-0.01"
>0.01
  (DCONWAY on 2001-01-29)</option>
<optgroup label="BackPAN">'
<option
  
  value="ABIGAIL/Regexp-Common-2013031201"
>2013031201
  (ABIGAIL on 2013-03-12)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2013031101"
>2013031101
  (ABIGAIL on 2013-03-11)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2013030901"
>2013030901
  (ABIGAIL on 2013-03-09)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011121001"
>2011121001
  (ABIGAIL on 2011-12-10)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011041701"
>2011041701
  (ABIGAIL on 2011-04-17)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011041602"
>2011041602
  (ABIGAIL on 2011-04-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011041601"
>2011041601
  (ABIGAIL on 2011-04-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2010010201"
>2010010201
  (ABIGAIL on 2010-01-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2009123002"
>2009123002
  (ABIGAIL on 2009-12-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2009123001"
>2009123001
  (ABIGAIL on 2009-12-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.122"
>2.122
  (ABIGAIL on 2008-05-26)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.120"
>2.120
  (ABIGAIL on 2005-03-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.119"
>2.119
  (ABIGAIL on 2005-01-01)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.118"
>2.118
  (ABIGAIL on 2004-12-15)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.117"
>2.117
  (ABIGAIL on 2004-07-01)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.116"
>2.116
  (ABIGAIL on 2004-06-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.115"
>2.115
  (ABIGAIL on 2004-06-09)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.113"
>2.113
  (ABIGAIL on 2003-04-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.112"
>2.112
  (ABIGAIL on 2003-03-25)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.111"
>2.111
  (ABIGAIL on 2003-03-12)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.110"
>2.110
  (ABIGAIL on 2003-02-21)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.109"
>2.109
  (ABIGAIL on 2003-02-10)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.108"
>2.108
  (ABIGAIL on 2003-02-09)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.107"
>2.107
  (ABIGAIL on 2003-02-08)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.106"
>2.106
  (ABIGAIL on 2003-02-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.105"
>2.105
  (ABIGAIL on 2003-02-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.104"
>2.104
  (ABIGAIL on 2003-01-24)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.103"
>2.103
  (ABIGAIL on 2003-01-24)</option>
<option
  
  value="ABIGAIL/Regexp-Common-1.30"
>1.30
  (ABIGAIL on 2003-01-17)</option>
<option
  
  value="ABIGAIL/Regexp-Common-1.29"
>1.29
  (ABIGAIL on 2003-01-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-1.20"
>1.20
  (ABIGAIL on 2002-08-27)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.09"
>0.09
  (ABIGAIL on 2002-08-06)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.08"
>0.08
  (ABIGAIL on 2002-08-06)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.07"
>0.07
  (ABIGAIL on 2002-08-05)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.05"
>0.05
  (ABIGAIL on 2002-08-01)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.03"
>0.03
  (ABIGAIL on 2002-07-31)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.02"
>0.02
  (ABIGAIL on 2002-07-24)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/ABIGAIL/Regexp-Common-2017060201/diff/' + encodeURIComponent(this.value) + '/lib/Regexp/Common.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="ABIGAIL/Regexp-Common-2017060201"
>2017060201
  (ABIGAIL on 2017-06-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2017040401"
>2017040401
  (ABIGAIL on 2017-04-04)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016060801"
>2016060801
  (ABIGAIL on 2016-06-08)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016060201"
>2016060201
  (ABIGAIL on 2016-06-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016060101"
>2016060101
  (ABIGAIL on 2016-05-31)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016053101"
>2016053101
  (ABIGAIL on 2016-05-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016053001"
>2016053001
  (ABIGAIL on 2016-05-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052901"
>2016052901
  (ABIGAIL on 2016-05-29)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052804"
>2016052804
  (ABIGAIL on 2016-05-28)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052803"
>2016052803
  (ABIGAIL on 2016-05-28)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052802"
>2016052802
  (ABIGAIL on 2016-05-27)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052801"
>2016052801
  (ABIGAIL on 2016-05-27)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016020301"
>2016020301
  (ABIGAIL on 2016-02-03)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016010801"
>2016010801
  (ABIGAIL on 2016-01-08)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016010701"
>2016010701
  (ABIGAIL on 2016-01-07)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2015121601"
>2015121601
  (ABIGAIL on 2015-12-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2013031301"
>2013031301
  (ABIGAIL on 2013-03-13)</option>
<option
  
  value="DCONWAY/Regexp-Common-0.01"
>0.01
  (DCONWAY on 2001-01-29)</option>
<optgroup label="BackPAN">'
<option
  
  value="ABIGAIL/Regexp-Common-2013031201"
>2013031201
  (ABIGAIL on 2013-03-12)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2013031101"
>2013031101
  (ABIGAIL on 2013-03-11)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2013030901"
>2013030901
  (ABIGAIL on 2013-03-09)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011121001"
>2011121001
  (ABIGAIL on 2011-12-10)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011041701"
>2011041701
  (ABIGAIL on 2011-04-17)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011041602"
>2011041602
  (ABIGAIL on 2011-04-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011041601"
>2011041601
  (ABIGAIL on 2011-04-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2010010201"
>2010010201
  (ABIGAIL on 2010-01-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2009123002"
>2009123002
  (ABIGAIL on 2009-12-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2009123001"
>2009123001
  (ABIGAIL on 2009-12-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.122"
>2.122
  (ABIGAIL on 2008-05-26)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.120"
>2.120
  (ABIGAIL on 2005-03-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.119"
>2.119
  (ABIGAIL on 2005-01-01)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.118"
>2.118
  (ABIGAIL on 2004-12-15)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.117"
>2.117
  (ABIGAIL on 2004-07-01)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.116"
>2.116
  (ABIGAIL on 2004-06-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.115"
>2.115
  (ABIGAIL on 2004-06-09)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.113"
>2.113
  (ABIGAIL on 2003-04-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.112"
>2.112
  (ABIGAIL on 2003-03-25)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.111"
>2.111
  (ABIGAIL on 2003-03-12)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.110"
>2.110
  (ABIGAIL on 2003-02-21)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.109"
>2.109
  (ABIGAIL on 2003-02-10)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.108"
>2.108
  (ABIGAIL on 2003-02-09)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.107"
>2.107
  (ABIGAIL on 2003-02-08)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.106"
>2.106
  (ABIGAIL on 2003-02-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.105"
>2.105
  (ABIGAIL on 2003-02-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.104"
>2.104
  (ABIGAIL on 2003-01-24)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.103"
>2.103
  (ABIGAIL on 2003-01-24)</option>
<option
  
  value="ABIGAIL/Regexp-Common-1.30"
>1.30
  (ABIGAIL on 2003-01-17)</option>
<option
  
  value="ABIGAIL/Regexp-Common-1.29"
>1.29
  (ABIGAIL on 2003-01-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-1.20"
>1.20
  (ABIGAIL on 2002-08-27)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.09"
>0.09
  (ABIGAIL on 2002-08-06)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.08"
>0.08
  (ABIGAIL on 2002-08-06)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.07"
>0.07
  (ABIGAIL on 2002-08-05)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.05"
>0.05
  (ABIGAIL on 2002-08-01)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.03"
>0.03
  (ABIGAIL on 2002-07-31)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.02"
>0.02
  (ABIGAIL on 2002-07-24)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><a href="https://metacpan.org/pod/Config" title="Config" class="ellipsis">Config</a></li>
  <li><a href="https://metacpan.org/pod/strict" title="strict" class="ellipsis">strict</a></li>
  <li><a href="https://metacpan.org/pod/vars" title="vars" class="ellipsis">vars</a></li>
  <li><a href="https://metacpan.org/pod/warnings" title="warnings" class="ellipsis">warnings</a></li>
  <li><i class="ttip" title="dynamic_config enabled">and possibly others</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Regexp::Common/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Regexp%3A%3ACommon">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Regexp-Common">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/ABIGAIL/Regexp-Common-2017060201/view/lib/Regexp/Common.pm">This version</a>
    </li>
    <li>
      <a href="./Regexp::Common.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/TINITA"><img src="https://www.gravatar.com/avatar/41d992bb7c01d13ffb8b7bf1ed355e91?d=identicon&amp;s=20" title="TINITA" alt="TINITA"></a>
<a class="display-all" href="https://metacpan.org/author/KES"><img src="https://www.gravatar.com/avatar/e8530f00b43b4f6a056f8ad4ee52ea47?d=identicon&amp;s=20" title="KES" alt="KES"></a>
<a class="display-all" href="https://metacpan.org/author/AYOUNG"><img src="https://www.gravatar.com/avatar/8d1e4946c288fbe87d1e0394f3e41b24?d=identicon&amp;s=20" title="AYOUNG" alt="AYOUNG"></a>
<a class="display-all" href="https://metacpan.org/author/XIAODONG"><img src="https://www.gravatar.com/avatar/0c6eb3fe8066dfe155811840026970e7?d=identicon&amp;s=20" title="XIAODONG" alt="XIAODONG"></a>
<a class="display-all" href="https://metacpan.org/author/VTFRVL"><img src="https://www.gravatar.com/avatar/6beed457260757333c23f30fa275590f?d=identicon&amp;s=20" title="VTFRVL" alt="VTFRVL"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Regexp-Common/plussers">32 PAUSE users</a>
</div>
<div>
    24 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 1 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-contrib-email="regexp-common@abigail.be"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Abigail
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/ABIGAIL" class="author-name">Abigail</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/lib/Regexp/Common.pm&#39;" class="">
<option
  selected
  value="ABIGAIL/Regexp-Common-2017060201"
>2017060201
  (ABIGAIL on 2017-06-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2017040401"
>2017040401
  (ABIGAIL on 2017-04-04)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016060801"
>2016060801
  (ABIGAIL on 2016-06-08)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016060201"
>2016060201
  (ABIGAIL on 2016-06-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016060101"
>2016060101
  (ABIGAIL on 2016-05-31)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016053101"
>2016053101
  (ABIGAIL on 2016-05-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016053001"
>2016053001
  (ABIGAIL on 2016-05-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052901"
>2016052901
  (ABIGAIL on 2016-05-29)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052804"
>2016052804
  (ABIGAIL on 2016-05-28)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052803"
>2016052803
  (ABIGAIL on 2016-05-28)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052802"
>2016052802
  (ABIGAIL on 2016-05-27)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016052801"
>2016052801
  (ABIGAIL on 2016-05-27)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016020301"
>2016020301
  (ABIGAIL on 2016-02-03)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016010801"
>2016010801
  (ABIGAIL on 2016-01-08)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2016010701"
>2016010701
  (ABIGAIL on 2016-01-07)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2015121601"
>2015121601
  (ABIGAIL on 2015-12-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2013031301"
>2013031301
  (ABIGAIL on 2013-03-13)</option>
<option
  
  value="DCONWAY/Regexp-Common-0.01"
>0.01
  (DCONWAY on 2001-01-29)</option>
<optgroup label="BackPAN">'
<option
  
  value="ABIGAIL/Regexp-Common-2013031201"
>2013031201
  (ABIGAIL on 2013-03-12)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2013031101"
>2013031101
  (ABIGAIL on 2013-03-11)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2013030901"
>2013030901
  (ABIGAIL on 2013-03-09)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011121001"
>2011121001
  (ABIGAIL on 2011-12-10)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011041701"
>2011041701
  (ABIGAIL on 2011-04-17)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011041602"
>2011041602
  (ABIGAIL on 2011-04-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2011041601"
>2011041601
  (ABIGAIL on 2011-04-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2010010201"
>2010010201
  (ABIGAIL on 2010-01-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2009123002"
>2009123002
  (ABIGAIL on 2009-12-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2009123001"
>2009123001
  (ABIGAIL on 2009-12-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.122"
>2.122
  (ABIGAIL on 2008-05-26)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.120"
>2.120
  (ABIGAIL on 2005-03-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.119"
>2.119
  (ABIGAIL on 2005-01-01)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.118"
>2.118
  (ABIGAIL on 2004-12-15)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.117"
>2.117
  (ABIGAIL on 2004-07-01)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.116"
>2.116
  (ABIGAIL on 2004-06-30)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.115"
>2.115
  (ABIGAIL on 2004-06-09)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.113"
>2.113
  (ABIGAIL on 2003-04-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.112"
>2.112
  (ABIGAIL on 2003-03-25)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.111"
>2.111
  (ABIGAIL on 2003-03-12)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.110"
>2.110
  (ABIGAIL on 2003-02-21)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.109"
>2.109
  (ABIGAIL on 2003-02-10)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.108"
>2.108
  (ABIGAIL on 2003-02-09)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.107"
>2.107
  (ABIGAIL on 2003-02-08)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.106"
>2.106
  (ABIGAIL on 2003-02-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.105"
>2.105
  (ABIGAIL on 2003-02-02)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.104"
>2.104
  (ABIGAIL on 2003-01-24)</option>
<option
  
  value="ABIGAIL/Regexp-Common-2.103"
>2.103
  (ABIGAIL on 2003-01-24)</option>
<option
  
  value="ABIGAIL/Regexp-Common-1.30"
>1.30
  (ABIGAIL on 2003-01-17)</option>
<option
  
  value="ABIGAIL/Regexp-Common-1.29"
>1.29
  (ABIGAIL on 2003-01-16)</option>
<option
  
  value="ABIGAIL/Regexp-Common-1.20"
>1.20
  (ABIGAIL on 2002-08-27)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.09"
>0.09
  (ABIGAIL on 2002-08-06)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.08"
>0.08
  (ABIGAIL on 2002-08-06)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.07"
>0.07
  (ABIGAIL on 2002-08-05)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.05"
>0.05
  (ABIGAIL on 2002-08-01)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.03"
>0.03
  (ABIGAIL on 2002-07-31)</option>
<option
  
  value="ABIGAIL/Regexp-Common-0.02"
>0.02
  (ABIGAIL on 2002-07-24)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Regexp-Common">Regexp-Common-2017060201</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage three &#10;
          • 195 direct dependents &#10;          • 487 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Regexp-Common-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Regexp-Common-2017060201">
    <input type="hidden" name="author" value="ABIGAIL">
    <input type="hidden" name="distribution" value="Regexp-Common">
    <button type="submit" class="favorite highlight"><span>56</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Regexp::Common.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>56</span> ++</a>
</div>
   / <span>Regexp::Common</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Regexp::Common.html#NAME">NAME</a></li>
  <li><a href="./Regexp::Common.html#SYNOPSIS">SYNOPSIS</a></li>
  <li><a href="./Regexp::Common.html#DESCRIPTION">DESCRIPTION</a>
    <ul>
      <li><a href="./Regexp::Common.html#General-syntax-for-requesting-patterns">General syntax for requesting patterns</a></li>
      <li><a href="./Regexp::Common.html#Flag-syntax">Flag syntax</a></li>
      <li><a href="./Regexp::Common.html#Universal-flags">Universal flags</a></li>
      <li><a href="./Regexp::Common.html#OO-interface-and-inline-matching/substitution">OO interface and inline matching/substitution</a></li>
      <li><a href="./Regexp::Common.html#Subroutine-based-interface">Subroutine-based interface</a></li>
      <li><a href="./Regexp::Common.html#Adding-new-regular-expressions">Adding new regular expressions</a></li>
      <li><a href="./Regexp::Common.html#Loading-specific-sets-of-patterns.">Loading specific sets of patterns.</a></li>
      <li><a href="./Regexp::Common.html#List-of-available-patterns">List of available patterns</a></li>
      <li><a href="./Regexp::Common.html#Forthcoming-patterns-and-features">Forthcoming patterns and features</a></li>
    </ul>
  </li>
  <li><a href="./Regexp::Common.html#DIAGNOSTICS">DIAGNOSTICS</a></li>
  <li><a href="./Regexp::Common.html#ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</a></li>
  <li><a href="./Regexp::Common.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Regexp::Common.html#MAINTENANCE">MAINTENANCE</a></li>
  <li><a href="./Regexp::Common.html#BUGS-AND-IRRITATIONS">BUGS AND IRRITATIONS</a></li>
  <li><a href="./Regexp::Common.html#NOT-A-BUG">NOT A BUG</a></li>
  <li><a href="./Regexp::Common.html#LICENSE-and-COPYRIGHT">LICENSE and COPYRIGHT</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Regexp::Common - Provide commonly requested regular expressions</p>

<h1 id="SYNOPSIS">SYNOPSIS</h1>

<pre><code> # STANDARD USAGE 

 use Regexp::Common;

 while (&lt;&gt;) {
     /$RE{num}{real}/               and print q{a number};
     /$RE{quoted}/                  and print q{a [&#39;&quot;`] quoted string};
    m[$RE{delimited}{-delim=&gt;&#39;/&#39;}]  and print q{a /.../ sequence};
     /$RE{balanced}{-parens=&gt;&#39;()&#39;}/ and print q{balanced parentheses};
     /$RE{profanity}/               and print q{a #*@%-ing word};
 }


 # SUBROUTINE-BASED INTERFACE

 use Regexp::Common &#39;RE_ALL&#39;;

 while (&lt;&gt;) {
     $_ =~ RE_num_real()              and print q{a number};
     $_ =~ RE_quoted()                and print q{a [&#39;&quot;`] quoted string};
     $_ =~ RE_delimited(-delim=&gt;&#39;/&#39;)  and print q{a /.../ sequence};
     $_ =~ RE_balanced(-parens=&gt;&#39;()&#39;} and print q{balanced parentheses};
     $_ =~ RE_profanity()             and print q{a #*@%-ing word};
 }


 # IN-LINE MATCHING...

 if ( $RE{num}{int}-&gt;matches($text) ) {...}


 # ...AND SUBSTITUTION

 my $cropped = $RE{ws}{crop}-&gt;subs($uncropped);


 # ROLL-YOUR-OWN PATTERNS

 use Regexp::Common &#39;pattern&#39;;

 pattern name   =&gt; [&#39;name&#39;, &#39;mine&#39;],
         create =&gt; &#39;(?i:J[.]?\s+A[.]?\s+Perl-Hacker)&#39;,
         ;

 my $name_matcher = $RE{name}{mine};

 pattern name    =&gt; [ &#39;lineof&#39;, &#39;-char=_&#39; ],
         create  =&gt; sub {
                        my $flags = shift;
                        my $char = quotemeta $flags-&gt;{-char};
                        return &#39;(?:^$char+$)&#39;;
                    },
         match   =&gt; sub {
                        my ($self, $str) = @_;
                        return $str !~ /[^$self-&gt;{flags}{-char}]/;
                    },
         subs   =&gt; sub {
                        my ($self, $str, $replacement) = @_;
                        $_[1] =~ s/^$self-&gt;{flags}{-char}+$//g;
                   },
         ;

 my $asterisks = $RE{lineof}{-char=&gt;&#39;*&#39;};

 # DECIDING WHICH PATTERNS TO LOAD.

 use Regexp::Common qw /comment number/;  # Comment and number patterns.
 use Regexp::Common qw /no_defaults/;     # Don&#39;t load any patterns.
 use Regexp::Common qw /!delimited/;      # All, but delimited patterns.</code></pre>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>By default, this module exports a single hash (<code>%RE</code>) that stores or generates commonly needed regular expressions (see <a href="./Regexp::Common.html#List-of-available-patterns">&quot;List of available patterns&quot;</a>).</p>

<p>There is an alternative, subroutine-based syntax described in <a href="./Regexp::Common.html#Subroutine-based-interface">&quot;Subroutine-based interface&quot;</a>.</p>

<h2 id="General-syntax-for-requesting-patterns"><a id="General"></a>General syntax for requesting patterns</h2>

<p>To access a particular pattern, <code>%RE</code> is treated as a hierarchical hash of hashes (of hashes...), with each successive key being an identifier. For example, to access the pattern that matches real numbers, you specify:</p>

<pre><code>        $RE{num}{real}
        </code></pre>

<p>and to access the pattern that matches integers:</p>

<pre><code>        $RE{num}{int}</code></pre>

<p>Deeper layers of the hash are used to specify <i>flags</i>: arguments that modify the resulting pattern in some way. The keys used to access these layers are prefixed with a minus sign and may have a value; if a value is given, it&#39;s done by using a multidimensional key. For example, to access the pattern that matches base-2 real numbers with embedded commas separating groups of three digits (e.g. 10,101,110.110101101):</p>

<pre><code>        $RE{num}{real}{-base =&gt; 2}{-sep =&gt; &#39;,&#39;}{-group =&gt; 3}</code></pre>

<p>Through the magic of Perl, these flag layers may be specified in any order (and even interspersed through the identifier keys!) so you could get the same pattern with:</p>

<pre><code>        $RE{num}{real}{-sep =&gt; &#39;,&#39;}{-group =&gt; 3}{-base =&gt; 2}</code></pre>

<p>or:</p>

<pre><code>        $RE{num}{-base =&gt; 2}{real}{-group =&gt; 3}{-sep =&gt; &#39;,&#39;}</code></pre>

<p>or even:</p>

<pre><code>        $RE{-base =&gt; 2}{-group =&gt; 3}{-sep =&gt; &#39;,&#39;}{num}{real}</code></pre>

<p>etc.</p>

<p>Note, however, that the relative order of amongst the identifier keys <i>is</i> significant. That is:</p>

<pre><code>        $RE{list}{set}</code></pre>

<p>would not be the same as:</p>

<pre><code>        $RE{set}{list}</code></pre>

<h2 id="Flag-syntax"><a id="Flag"></a>Flag syntax</h2>

<p>In versions prior to 2.113, flags could also be written as <code>{&quot;-flag=value&quot;}</code>. This no longer works, although <code>{&quot;-flag$;value&quot;}</code> still does. However, <code>{-flag =&gt; &#39;value&#39;}</code> is the preferred syntax.</p>

<h2 id="Universal-flags"><a id="Universal"></a>Universal flags</h2>

<p>Normally, flags are specific to a single pattern. However, there is two flags that all patterns may specify.</p>

<dl>

<dt id="-keep"><a id="keep"></a><code>-keep</code></dt>
<dd>

<p>By default, the patterns provided by <code>%RE</code> contain no capturing parentheses. However, if the <code>-keep</code> flag is specified (it requires no value) then any significant substrings that the pattern matches are captured. For example:</p>

<pre><code>        if ($str =~ $RE{num}{real}{-keep}) {
                $number   = $1;
                $whole    = $3;
                $decimals = $5;
        }</code></pre>

<p>Special care is needed if a &quot;kept&quot; pattern is interpolated into a larger regular expression, as the presence of other capturing parentheses is likely to change the &quot;number variables&quot; into which significant substrings are saved.</p>

<p>See also <a href="./Regexp::Common.html#Adding-new-regular-expressions">&quot;Adding new regular expressions&quot;</a>, which describes how to create new patterns with &quot;optional&quot; capturing brackets that respond to <code>-keep</code>.</p>

</dd>
<dt id="-i"><a id="i"></a><code>-i</code></dt>
<dd>

<p>Some patterns or subpatterns only match lowercase or uppercase letters. If one wants the do case insensitive matching, one option is to use the <code>/i</code> regexp modifier, or the special sequence <code>(?i)</code>. But if the functional interface is used, one does not have this option. The <code>-i</code> switch solves this problem; by using it, the pattern will do case insensitive matching.</p>

</dd>
</dl>

<h2 id="OO-interface-and-inline-matching/substitution"><a id="OO"></a><a id="OO-interface-and-inline-matching-substitution"></a>OO interface and inline matching/substitution</h2>

<p>The patterns returned from <code>%RE</code> are objects, so rather than writing:</p>

<pre><code>        if ($str =~ /$RE{some}{pattern}/ ) {...}</code></pre>

<p>you can write:</p>

<pre><code>        if ( $RE{some}{pattern}-&gt;matches($str) ) {...}</code></pre>

<p>For matching this would seem to have no great advantage apart from readability (but see below).</p>

<p>For substitutions, it has other significant benefits. Frequently you want to perform a substitution on a string without changing the original. Most people use this:</p>

<pre><code>        $changed = $original;
        $changed =~ s/$RE{some}{pattern}/$replacement/;</code></pre>

<p>The more adept use:</p>

<pre><code>        ($changed = $original) =~ s/$RE{some}{pattern}/$replacement/;</code></pre>

<p>Regexp::Common allows you do write this:</p>

<pre><code>        $changed = $RE{some}{pattern}-&gt;subs($original=&gt;$replacement);</code></pre>

<p>Apart from reducing precedence-angst, this approach has the added advantages that the substitution behaviour can be optimized from the regular expression, and the replacement string can be provided by default (see <a href="./Regexp::Common.html#Adding-new-regular-expressions">&quot;Adding new regular expressions&quot;</a>).</p>

<p>For example, in the implementation of this substitution:</p>

<pre><code>        $cropped = $RE{ws}{crop}-&gt;subs($uncropped);</code></pre>

<p>the default empty string is provided automatically, and the substitution is optimized to use:</p>

<pre><code>        $uncropped =~ s/^\s+//;
        $uncropped =~ s/\s+$//;</code></pre>

<p>rather than:</p>

<pre><code>        $uncropped =~ s/^\s+|\s+$//g;</code></pre>

<h2 id="Subroutine-based-interface"><a id="Subroutine"></a>Subroutine-based interface</h2>

<p>The hash-based interface was chosen because it allows regexes to be effortlessly interpolated, and because it also allows them to be &quot;curried&quot;. For example:</p>

<pre><code>        my $num = $RE{num}{int};

        my $commad     = $num-&gt;{-sep=&gt;&#39;,&#39;}{-group=&gt;3};
        my $duodecimal = $num-&gt;{-base=&gt;12};</code></pre>

<p>However, the use of tied hashes does make the access to Regexp::Common patterns slower than it might otherwise be. In contexts where impatience overrules laziness, Regexp::Common provides an additional subroutine-based interface.</p>

<p>For each (sub-)entry in the <code>%RE</code> hash (<code>$RE{key1}{key2}{etc}</code>), there is a corresponding exportable subroutine: <code>RE_key1_key2_etc()</code>. The name of each subroutine is the underscore-separated concatenation of the <i>non-flag</i> keys that locate the same pattern in <code>%RE</code>. Flags are passed to the subroutine in its argument list. Thus:</p>

<pre><code>        use Regexp::Common qw( RE_ws_crop RE_num_real RE_profanity );

        $str =~ RE_ws_crop() and die &quot;Surrounded by whitespace&quot;;

        $str =~ RE_num_real(-base=&gt;8, -sep=&gt;&quot; &quot;) or next;

        $offensive = RE_profanity(-keep);
        $str =~ s/$offensive/$bad{$1}++; &quot;&lt;expletive deleted&gt;&quot;/ge;</code></pre>

<p>Note that, unlike the hash-based interface (which returns objects), these subroutines return ordinary <code>qr</code>&#39;d regular expressions. Hence they do not curry, nor do they provide the OO match and substitution inlining described in the previous section.</p>

<p>It is also possible to export subroutines for all available patterns like so:</p>

<pre><code>        use Regexp::Common &#39;RE_ALL&#39;;</code></pre>

<p>Or you can export all subroutines with a common prefix of keys like so:</p>

<pre><code>        use Regexp::Common &#39;RE_num_ALL&#39;;</code></pre>

<p>which will export <code>RE_num_int</code> and <code>RE_num_real</code> (and if you have create more patterns who have first key <i>num</i>, those will be exported as well). In general, <i>RE_key1_..._keyn_ALL</i> will export all subroutines whose pattern names have first keys <i>key1</i> ... <i>keyn</i>.</p>

<h2 id="Adding-new-regular-expressions"><a id="Adding"></a>Adding new regular expressions</h2>

<p>You can add your own regular expressions to the <code>%RE</code> hash at run-time, using the exportable <code>pattern</code> subroutine. It expects a hash-like list of key/value pairs that specify the behaviour of the pattern. The various possible argument pairs are:</p>

<dl>

<dt id="name-=&gt;-[-@list-]"><a id="name"></a><a id="name------list"></a><code>name =&gt; [ @list ]</code></dt>
<dd>

<p>A required argument that specifies the name of the pattern, and any flags it may take, via a reference to a list of strings. For example:</p>

<pre><code>         pattern name =&gt; [qw( line of -char )],
                 # other args here
                 ;</code></pre>

<p>This specifies an entry <code>$RE{line}{of}</code>, which may take a <code>-char</code> flag.</p>

<p>Flags may also be specified with a default value, which is then used whenever the flag is specified without an explicit value (but not when the flag is omitted). For example:</p>

<pre><code>         pattern name =&gt; [qw( line of -char=_ )],
                 # default char is &#39;_&#39;
                 # other args here
                 ;</code></pre>

</dd>
<dt id="create-=&gt;-$sub_ref_or_string"><a id="create"></a><a id="create----sub_ref_or_string"></a><code>create =&gt; $sub_ref_or_string</code></dt>
<dd>

<p>A required argument that specifies either a string that is to be returned as the pattern:</p>

<pre><code>        pattern name    =&gt; [qw( line of underscores )],
                create  =&gt; q/(?:^_+$)/
                ;</code></pre>

<p>or a reference to a subroutine that will be called to create the pattern:</p>

<pre><code>        pattern name    =&gt; [qw( line of -char=_ )],
                create  =&gt; sub {
                                my ($self, $flags) = @_;
                                my $char = quotemeta $flags-&gt;{-char};
                                return &#39;(?:^$char+$)&#39;;
                            },
                ;</code></pre>

<p>If the subroutine version is used, the subroutine will be called with three arguments: a reference to the pattern object itself, a reference to a hash containing the flags and their values, and a reference to an array containing the non-flag keys.</p>

<p>Whatever the subroutine returns is stringified as the pattern.</p>

<p>No matter how the pattern is created, it is immediately postprocessed to include or exclude capturing parentheses (according to the value of the <code>-keep</code> flag). To specify such &quot;optional&quot; capturing parentheses within the regular expression associated with <code>create</code>, use the notation <code>(?k:...)</code>. Any parentheses of this type will be converted to <code>(...)</code> when the <code>-keep</code> flag is specified, or <code>(?:...)</code> when it is not. It is a Regexp::Common convention that the outermost capturing parentheses always capture the entire pattern, but this is not enforced.</p>

</dd>
<dt id="match-=&gt;-$sub_ref"><a id="match"></a><a id="match----sub_ref"></a><code>match =&gt; $sub_ref</code></dt>
<dd>

<p>An optional argument that specifies a subroutine that is to be called when the <code>$RE{...}-&gt;matches(...)</code> method of this pattern is invoked.</p>

<p>The subroutine should expect two arguments: a reference to the pattern object itself, and the string to be matched against.</p>

<p>It should return the same types of values as a <code>m/.../</code> does.</p>

<pre><code>     pattern name    =&gt; [qw( line of -char )],
             create  =&gt; sub {...},
             match   =&gt; sub {
                             my ($self, $str) = @_;
                             $str !~ /[^$self-&gt;{flags}{-char}]/;
                        },
             ;</code></pre>

</dd>
<dt id="subs-=&gt;-$sub_ref"><a id="subs"></a><a id="subs----sub_ref"></a><code>subs =&gt; $sub_ref</code></dt>
<dd>

<p>An optional argument that specifies a subroutine that is to be called when the <code>$RE{...}-&gt;subs(...)</code> method of this pattern is invoked.</p>

<p>The subroutine should expect three arguments: a reference to the pattern object itself, the string to be changed, and the value to be substituted into it. The third argument may be <code>undef</code>, indicating the default substitution is required.</p>

<p>The subroutine should return the same types of values as an <code>s/.../.../</code> does.</p>

<p>For example:</p>

<pre><code>     pattern name    =&gt; [ &#39;lineof&#39;, &#39;-char=_&#39; ],
             create  =&gt; sub {...},
             subs    =&gt; sub {
                          my ($self, $str, $ignore_replacement) = @_;
                          $_[1] =~ s/^$self-&gt;{flags}{-char}+$//g;
                        },
             ;</code></pre>

<p>Note that such a subroutine will almost always need to modify <code>$_[1]</code> directly.</p>

</dd>
<dt id="version-=&gt;-$minimum_perl_version"><a id="version"></a><a id="version----minimum_perl_version"></a><code>version =&gt; $minimum_perl_version</code></dt>
<dd>

<p>If this argument is given, it specifies the minimum version of perl required to use the new pattern. Attempts to use the pattern with earlier versions of perl will generate a fatal diagnostic.</p>

</dd>
</dl>

<h2 id="Loading-specific-sets-of-patterns."><a id="Loading"></a><a id="Loading-specific-sets-of-patterns"></a>Loading specific sets of patterns.</h2>

<p>By default, all the sets of patterns listed below are made available. However, it is possible to indicate which sets of patterns should be made available - the wanted sets should be given as arguments to <code>use</code>. Alternatively, it is also possible to indicate which sets of patterns should not be made available - those sets will be given as argument to the <code>use</code> statement, but are preceded with an exclaimation mark. The argument <i>no_defaults</i> indicates none of the default patterns should be made available. This is useful for instance if all you want is the <code>pattern()</code> subroutine.</p>

<p>Examples:</p>

<pre><code> use Regexp::Common qw /comment number/;  # Comment and number patterns.
 use Regexp::Common qw /no_defaults/;     # Don&#39;t load any patterns.
 use Regexp::Common qw /!delimited/;      # All, but delimited patterns.</code></pre>

<p>It&#39;s also possible to load your own set of patterns. If you have a module <code>Regexp::Common::my_patterns</code> that makes patterns available, you can have it made available with</p>

<pre><code> use Regexp::Common qw /my_patterns/;</code></pre>

<p>Note that the default patterns will still be made available - only if you use <i>no_defaults</i>, or mention one of the default sets explicitly, the non mentioned defaults aren&#39;t made available.</p>

<h2 id="List-of-available-patterns"><a id="List"></a>List of available patterns</h2>

<p>The patterns listed below are currently available. Each set of patterns has its own manual page describing the details. For each pattern set named <i>name</i>, the manual page <i>Regexp::Common::name</i> describes the details.</p>

<p>Currently available are:</p>

<dl>

<dt id="Regexp::Common::balanced"><a id="Regexp"></a>Regexp::Common::balanced</dt>
<dd>

<p>Provides regexes for strings with balanced parenthesized delimiters.</p>

</dd>
<dt id="Regexp::Common::comment"><a id="Regexp1"></a>Regexp::Common::comment</dt>
<dd>

<p>Provides regexes for comments of various languages (43 languages currently).</p>

</dd>
<dt id="Regexp::Common::delimited"><a id="Regexp2"></a>Regexp::Common::delimited</dt>
<dd>

<p>Provides regexes for delimited strings.</p>

</dd>
<dt id="Regexp::Common::lingua"><a id="Regexp3"></a>Regexp::Common::lingua</dt>
<dd>

<p>Provides regexes for palindromes.</p>

</dd>
<dt id="Regexp::Common::list"><a id="Regexp4"></a>Regexp::Common::list</dt>
<dd>

<p>Provides regexes for lists.</p>

</dd>
<dt id="Regexp::Common::net"><a id="Regexp5"></a>Regexp::Common::net</dt>
<dd>

<p>Provides regexes for IPv4, IPv6, and MAC addresses.</p>

</dd>
<dt id="Regexp::Common::number"><a id="Regexp6"></a>Regexp::Common::number</dt>
<dd>

<p>Provides regexes for numbers (integers and reals).</p>

</dd>
<dt id="Regexp::Common::profanity"><a id="Regexp7"></a>Regexp::Common::profanity</dt>
<dd>

<p>Provides regexes for profanity.</p>

</dd>
<dt id="Regexp::Common::whitespace"><a id="Regexp8"></a>Regexp::Common::whitespace</dt>
<dd>

<p>Provides regexes for leading and trailing whitespace.</p>

</dd>
<dt id="Regexp::Common::zip"><a id="Regexp9"></a>Regexp::Common::zip</dt>
<dd>

<p>Provides regexes for zip codes.</p>

</dd>
</dl>

<h2 id="Forthcoming-patterns-and-features"><a id="Forthcoming"></a>Forthcoming patterns and features</h2>

<p>Future releases of the module will also provide patterns for the following:</p>

<pre><code>        * email addresses 
        * HTML/XML tags
        * more numerical matchers,
        * mail headers (including multiline ones),
        * more URLS
        * telephone numbers of various countries
        * currency (universal 3 letter format, Latin-1, currency names)
        * dates
        * binary formats (e.g. UUencoded, MIMEd)</code></pre>

<p>If you have other patterns or pattern generators that you think would be generally useful, please send them to the maintainer -- preferably as source code using the <code>pattern</code> subroutine. Submissions that include a set of tests will be especially welcome.</p>

<h1 id="DIAGNOSTICS">DIAGNOSTICS</h1>

<dl>

<dt id="Can&#39;t-export-unknown-subroutine-%s"><a id="Can"></a><a id="Can-t-export-unknown-subroutine--s"></a><code>Can&#39;t export unknown subroutine %s</code></dt>
<dd>

<p>The subroutine-based interface didn&#39;t recognize the requested subroutine. Often caused by a spelling mistake or an incompletely specified name.</p>

</dd>
<dt id="Can&#39;t-create-unknown-regex:-$RE{...}"><a id="Can1"></a><a id="Can-t-create-unknown-regex:--RE"></a><code>Can&#39;t create unknown regex: $RE{...}</code></dt>
<dd>

<p>Regexp::Common doesn&#39;t have a generator for the requested pattern. Often indicates a misspelt or missing parameter.</p>

</dd>
<dt id="Perl-%f-does-not-support-the-pattern-$RE{...}.-You-need-Perl-%f-or-later"><a id="Perl"></a><a id="Perl--f-does-not-support-the-pattern--RE-...-.-You-need-Perl--f-or-later"></a><code>Perl %f does not support the pattern $RE{...}. You need Perl %f or later</code></dt>
<dd>

<p>The requested pattern requires advanced regex features (e.g. recursion) that not available in your version of Perl. Time to upgrade.</p>

</dd>
<dt id="pattern()-requires-argument:-name-=&gt;-[-@list-]"><a id="pattern"></a><a id="pattern--requires-argument:-name------list"></a><code>pattern() requires argument: name =&gt; [ @list ]</code></dt>
<dd>

<p>Every user-defined pattern specification must have a name.</p>

</dd>
<dt id="pattern()-requires-argument:-create-=&gt;-$sub_ref_or_string"><a id="pattern1"></a><a id="pattern--requires-argument:-create----sub_ref_or_string"></a><code>pattern() requires argument: create =&gt; $sub_ref_or_string</code></dt>
<dd>

<p>Every user-defined pattern specification must provide a pattern creation mechanism: either a pattern string or a reference to a subroutine that returns the pattern string.</p>

</dd>
<dt id="Base-must-be-between-1-and-36"><a id="Base"></a><code>Base must be between 1 and 36</code></dt>
<dd>

<p>The <code>$RE{num}{real}{-base=&gt;&#39;<i>N</i>&#39;}</code> pattern uses the characters [0-9A-Z] to represent the digits of various bases. Hence it only produces regular expressions for bases up to hexatricensimal.</p>

</dd>
<dt id="Must-specify-delimiter-in-$RE{delimited}"><a id="Must"></a><a id="Must-specify-delimiter-in--RE-delimited"></a><code>Must specify delimiter in $RE{delimited}</code></dt>
<dd>

<p>The pattern has no default delimiter. You need to write: <code>$RE{delimited}{-delim=&gt;<i>X</i>&#39;}</code> for some character <i>X</i></p>

</dd>
</dl>

<h1 id="ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</h1>

<p>Deepest thanks to the many people who have encouraged and contributed to this project, especially: Elijah, Jarkko, Tom, Nat, Ed, and Vivek.</p>

<p>Further thanks go to: Alexandr Ciornii, Blair Zajac, Bob Stockdale, Charles Thomas, Chris Vertonghen, the CPAN Testers, David Hand, Fany, Geoffrey Leach, Hermann-Marcus Behrens, Jerome Quelin, Jim Cromie, Lars Wilke, Linda Julien, Mike Arms, Mike Castle, Mikko, Murat Uenalan, Rafa&euml;l Garcia-Suarez, Ron Savage, Sam Vilain, Slaven Rezic, Smylers, Tim Maher, and all the others I&#39;ve forgotten.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Damian Conway (damian@conway.org)</p>

<h1 id="MAINTENANCE">MAINTENANCE</h1>

<p>This package is maintained by Abigail <span style="white-space: nowrap;">(<i>regexp-common@abigail.be</i>)</span>.</p>

<h1 id="BUGS-AND-IRRITATIONS"><a id="BUGS"></a>BUGS AND IRRITATIONS</h1>

<p>Bound to be plenty.</p>

<p>For a start, there are many common regexes missing. Send them in to <i>regexp-common@abigail.be</i>.</p>

<p>There are some POD issues when installing this module using a pre-5.6.0 perl; some manual pages may not install, or may not install correctly using a perl that is that old. You might consider upgrading your perl.</p>

<h1 id="NOT-A-BUG"><a id="NOT"></a>NOT A BUG</h1>

<ul>

<li><p>The various patterns are not anchored. That is, a pattern like <code>$RE {num} {int}</code> will match against &quot;abc4def&quot;, because a substring of the subject matches. This is by design, and not a bug. If you want the pattern to be anchored, use something like:</p>

<pre><code> my $integer = $RE {num} {int};
 $subj =~ /^$integer$/ and print &quot;Matches!\n&quot;;</code></pre>

</li>
</ul>

<h1 id="LICENSE-and-COPYRIGHT"><a id="LICENSE"></a>LICENSE and COPYRIGHT</h1>

<p>This software is Copyright (c) 2001 - 2017, Damian Conway and Abigail.</p>

<p>This module is free software, and maybe used under any of the following licenses:</p>

<pre><code> 1) The Perl Artistic License.     See the file COPYRIGHT.AL.
 2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2.
 3) The BSD License.               See the file COPYRIGHT.BSD.
 4) The MIT License.               See the file COPYRIGHT.MIT.</code></pre></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Regexp::Common, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Regexp::Common</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Regexp::Common</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Regexp::Common.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
